package com.aiyige.page.my.merchandisemanagement.model;

import com.aiyige.base.db.table.LearnVideoModel;
import com.aiyige.base.db.table.MajorCourseDBModel;
import com.aiyige.base.db.table.TraingCardDBModel;
import com.aiyige.base.db.table.TraingClassDBModel;
import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by zhuyakun on 2017/11/27.
 */

public class SearchResultItem implements MultiItemEntity {
    int itemType = 0;
    List<LearnVideoModel> learnVideoModelList = new LinkedList<>();
    List<MajorCourseDBModel> majorCourseDBModelList = new LinkedList<>();
    List<TraingClassDBModel> traingClassDBModelList = new LinkedList<>();
    List<TraingCardDBModel> traingCardDBModelList = new LinkedList<>();

    long totalLearnVideo;
    long totalMajorCourse;
    long totalTraingClass;
    long totalTraingCard;

    public static final int MAX_SAMPLE_NUM = 4;

    private SearchResultItem(Builder builder) {
        setItemType(builder.itemType);
        setLearnVideoModelList(builder.learnVideoModelList);
        setMajorCourseDBModelList(builder.majorCourseDBModelList);
        setTraingClassDBModelList(builder.traingClassDBModelList);
        setTraingCardDBModelList(builder.traingCardDBModelList);
        setTotalLearnVideo(builder.totalLearnVideo);
        setTotalMajorCourse(builder.totalMajorCourse);
        setTotalTraingClass(builder.totalTraingClass);
        setTotalTraingCard(builder.totalTraingCard);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    @Override
    public int getItemType() {
        return itemType;
    }

    public void setItemType(int itemType) {
        this.itemType = itemType;
    }

    public List<LearnVideoModel> getLearnVideoModelList() {
        return learnVideoModelList;
    }

    public void setLearnVideoModelList(List<LearnVideoModel> learnVideoModelList) {
        this.learnVideoModelList = learnVideoModelList;
    }

    public List<MajorCourseDBModel> getMajorCourseDBModelList() {
        return majorCourseDBModelList;
    }

    public void setMajorCourseDBModelList(List<MajorCourseDBModel> majorCourseDBModelList) {
        this.majorCourseDBModelList = majorCourseDBModelList;
    }

    public List<TraingClassDBModel> getTraingClassDBModelList() {
        return traingClassDBModelList;
    }

    public void setTraingClassDBModelList(List<TraingClassDBModel> traingClassDBModelList) {
        this.traingClassDBModelList = traingClassDBModelList;
    }

    public List<TraingCardDBModel> getTraingCardDBModelList() {
        return traingCardDBModelList;
    }

    public void setTraingCardDBModelList(List<TraingCardDBModel> traingCardDBModelList) {
        this.traingCardDBModelList = traingCardDBModelList;
    }

    public long getTotalLearnVideo() {
        return totalLearnVideo;
    }

    public void setTotalLearnVideo(long totalLearnVideo) {
        this.totalLearnVideo = totalLearnVideo;
    }

    public long getTotalMajorCourse() {
        return totalMajorCourse;
    }

    public void setTotalMajorCourse(long totalMajorCourse) {
        this.totalMajorCourse = totalMajorCourse;
    }

    public long getTotalTraingClass() {
        return totalTraingClass;
    }

    public void setTotalTraingClass(long totalTraingClass) {
        this.totalTraingClass = totalTraingClass;
    }

    public long getTotalTraingCard() {
        return totalTraingCard;
    }

    public void setTotalTraingCard(long totalTraingCard) {
        this.totalTraingCard = totalTraingCard;
    }


    public static final class Builder {
        private int itemType;
        private List<LearnVideoModel> learnVideoModelList;
        private List<MajorCourseDBModel> majorCourseDBModelList;
        private List<TraingClassDBModel> traingClassDBModelList;
        private List<TraingCardDBModel> traingCardDBModelList;
        private long totalLearnVideo;
        private long totalMajorCourse;
        private long totalTraingClass;
        private long totalTraingCard;

        private Builder() {
            learnVideoModelList = new LinkedList<>();
            majorCourseDBModelList = new LinkedList<>();
            traingClassDBModelList = new LinkedList<>();
            traingClassDBModelList = new LinkedList<>();
            totalLearnVideo = 0;
            totalMajorCourse = 0;
            totalTraingClass = 0;
            totalTraingCard = 0;
        }

        public Builder itemType(int itemType) {
            this.itemType = itemType;
            return this;
        }

        public Builder learnVideoModelList(List<LearnVideoModel> learnVideoModelList) {
            this.learnVideoModelList = learnVideoModelList;
            return this;
        }

        public Builder majorCourseDBModelList(List<MajorCourseDBModel> majorCourseDBModelList) {
            this.majorCourseDBModelList = majorCourseDBModelList;
            return this;
        }

        public Builder traingClassDBModelList(List<TraingClassDBModel> traingClassDBModelList) {
            this.traingClassDBModelList = traingClassDBModelList;
            return this;
        }

        public Builder traingCardDBModelList(List<TraingCardDBModel> traingCardDBModelList) {
            this.traingCardDBModelList = traingCardDBModelList;
            return this;
        }

        public Builder totalLearnVideo(long totalLearnVideo) {
            this.totalLearnVideo = totalLearnVideo;
            return this;
        }

        public Builder totalMajorCourse(long totalMajorCourse) {
            this.totalMajorCourse = totalMajorCourse;
            return this;
        }

        public Builder totalTraingClass(long totalTraingClass) {
            this.totalTraingClass = totalTraingClass;
            return this;
        }

        public Builder totalTraingCard(long totalTraingCard) {
            this.totalTraingCard = totalTraingCard;
            return this;
        }

        public SearchResultItem build() {
            return new SearchResultItem(this);
        }
    }
}
